<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>路由功能</title>
    <script src="angularjs/angular.min.js"></script>
    <script src="angular-route/angular-route.min.js"></script>
</head>
<body ng-app="forJsApp">
<a href="#/book">book</a>
<a href="#/section">section</a>
<br/>
<hr/>
<div ng-view>

</div>
<script>
    angular.module("forJsApp",["ngRoute"])
            .config(function($routeProvider){
                $routeProvider
                        .when('/book', {
                            templateUrl: 'book.html'
                        })
                        .when('/section', {
                            templateUrl: 'section.html'
                        });
            })
</script>
</body>
</html>